<template>
  <!-- 放置一个图标 -->
  <div style="display: inline-block" @click="fullHandle">
    <svg-icon icon-class="fullscreen" class="fullscreen" />
  </div>
</template>

<script>
import screenfull from 'screenfull'
export default {
  name: 'ScreenFull',
  methods: {
    fullHandle: function() {
      screenfull.toggle()
      // document.documentElement.webkitRequestFullScreen()
    }
  }
}
</script>

<style lang="scss" scoped>
.fullscreen {
  width: 20px;
  height: 20px;
  color: #fff;
  cursor: pointer;
}
</style>